#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	FILE* fp=fopen("LittleStar.txt","r");
	if (fp==NULL)
	printf("Err");
	char file[7][35]={0,};
	
	int i=0;
	for (i=0; i<7; i++){
		fgets((char *)(file+i), 34, fp);
	}
	int j=0;
	for (i=0; i<7; i++) {
		for (j=0; j<34&&file[i][j]!='\0'; j++){
			if (file[i][j]=='\n'){
				file[i][j]='\r';
			}
		}
	}
	fclose(fp); 
	
	FILE* fp0=fopen("LittleStar.txt","w");
	int Err[8]={0,}; 
	for (i=0; i<6; i++)
	Err[i]=fprintf(fp0, "%s\n", file+i);
	Err[6]=fprintf(fp0, "%s", file+i);
	fclose(fp0);
	
	int err=0;
	for (i=0; i<7; i++)
	if (Err[i]==0)
	err++;
	if (err==0)
	printf("Finish");
	else
	printf("Err");
	return 0;
}
